<?php $this->_extends(Helper_Store::layout()); ?>
<?php $this->_block('title'); ?>  <?=_L('login')?> - <?=$store['name']?> <?php $this->_endblock(); ?>
<?php $this->_block('head'); ?>

<?php $this->_endblock(); ?>
<?php $this->_block('contents'); ?>
<div id="MainWrap">


<div class="PassportWrap">
<?php if(isset($error)&&count($error)):?>
	<div class="notice"> 
		<?php foreach($error as $e=>$v):
			switch($e){
				case 'lemail': echo ' No find User  .<br>'; break;
				case 'lpassword': echo ' Password Error .<br>'; break;
				case 'password2': echo ' cofim password must same as password.<br>';break;
				case 'password': echo ' Password  too lease .<br>'; break;
				case 'exist': echo _L('email_exists').'<br>'; break;
				case 'signup': 
				default: echo ' Sign up Error   .<br>'; break;
			}
		 endforeach;?>
	</div>
	<?php endif;?>
  <form method="post" action=" " class='loginform'>
    <div class="RegisterWrap">
      <h4><?=_L('sign_in')?></h4>
      <div class="intro"><?=_L('returning_customer')?></div>
      <div class="form">
        <input name="forward" type="hidden" value="">
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <th><em style="color:red">*</em><?=_L('email')?>：</th>
            <td><input class="inputstyle _x_ipt" name="email" type="email" required="true" id="reg_email" maxlength="200" vtype="email" tabindex="1" />
              </td>
          </tr>
          <tr>
            <th><em style="color:red">*</em><?=_L('password')?>：</th>
            <td><input autocomplete="off" name="password" class="inputstyle _x_ipt" type="password" required="true" id="in_passwd" tabindex="2" vtype="password" />
               </td>
          </tr>
          <tr>
            <th></th>
            <td><input class="actbtn btn-login" type="submit" value="Login" tabindex="3" />
              </td>
          </tr>
        </table>
      </div>
    </div>
	<input type="hidden" name="cmd" value="login" />
    <input type='hidden' name='r' value='<?=$_ctx->r?>'/>
  </form>
</div>

<div class="clear"></div>

<div class="PassportWrap">
<form method="post" action="" class='signform'>
  <div class="RegisterWrap">
    <h4><?=_L('register')?></h4>
    <div class="intro"><?=_L('create_customer')?></div>
    <div class="form">
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <th><em style="color:red">*</em><?=_L('email')?>：</th>
          <td><input autocomplete="off" class="inputstyle _x_ipt" name="email" type="email" required="true" id="reg_email" maxlength="200" vtype="email" tabindex="5" />
            <span id="reg_user_info"></span></td>
        </tr>
        <tr>
          <th><em style="color:red">*</em><?=_L('password')?>：</th>
          <td><input autocomplete="off" class="inputstyle _x_ipt" name="password" type="password" required="true" id="reg_passwd" vtype="password" tabindex="6" /></td>
        </tr>
        <tr>
          <th><em style="color:red">*</em><?=_L('confirm_password')?> ：</th>
          <td><input autocomplete="off" class="inputstyle _x_ipt" name="password2" type="password" required="true" id="reg_passwd_r" vtype="password" tabindex="7" /></td>
        </tr>
        <tr>
          <th><?=_L('member/gender')?>：</th>
          <td><input type="radio" name="gender" value="m" <?php if($u['gender']=='m'){echo 'checked=true';}?> /><?=_L('member/male')?>  &nbsp;&nbsp; <input type="radio" name="gender" value="f" <?php if($u['gender']=='f'){echo 'checked=true';}?> /><?=_L('member/female')?></td>
        </tr>
		
			  <tr>
                <th><em style="color:red">*</em> <?=_L('first_name')?>:</th>
                <td><input type="text" name="firstname" value="<?=$u['firstname']?>" size="20" class="inputstyle _x_ipt" />
                    </td>
              </tr>
              <tr>
                <th><em style="color:red">*</em> <?=_L('last_name')?>:</th>
                <td><input type="text" name="lastname" value="<?=$u['lastname']?>" size="20" class="inputstyle _x_ipt" />
                    </td>
              </tr>
			  <tr>
                <th> <?=_L('phone')?>:</th>
                <td><input type="text" name="phone" value="<?=$u['phone']?>" size="20" class="inputstyle _x_ipt" />
                    </td>
              </tr>
			  <tr>
                <th> <?=_L('company')?>:</th>
                <td><input type="text" name="company" value="<?=$u['company']?>" size="20" class="inputstyle _x_ipt" />
                    </td>
              </tr>
              <tr>
                <th>  <?=_L('street')?>:</th>
                <td> <input type="text" class="inputstyle _x_ipt" name="street1" value="<?=$u['street1']?>" size="40" />
				</td>
              </tr>
			  <tr>
                <th><?=_L('street')?> 2:</th>
                <td> <input type="text" class="inputstyle _x_ipt" name="street2" value="<?=$u['street2']?>" size="40" />
				</td>
              </tr>
              <tr>
                <th><?=_L('postalcode')?>：</th>
                <td><input type="text" name="postalcode" value="<?=$u['postalcode']?>" size="10" class="inputstyle _x_ipt" /></td>
              </tr>
              
			  
			  
              <tr>
                <th><?=_L('city')?>：</th>
                <td><input type="text" name="cityname" value="<?=$u['cityname']?>" size="20" class="inputstyle _x_ipt" /></td>
              </tr>
              <tr>
                <th><?=_L('province')?>：</th>
                <td><input type="text" name="stateorprovince" value="<?=$u['stateorprovince']?>" size="20" class="inputstyle _x_ipt" /></td>
              </tr>
			  <tr>
                <th><?=_L('country')?>：</th>
                <td id="checkout-select-area">
                  <?php Q::control('dropdownlist','country',array(
        "items"=>$country_array,
        'value'=>$u['country']
    ))->display()?>
                </td>
              </tr>
        <tr>
          <th></th>
          <td><input class="actbtn btn-register" type="submit" value=" <?=_L('register')?> " />
           </td>
        </tr>
      </table>
    </div>
  </div>
  	<input type="hidden" name="cmd" value="signup" />
    <input type='hidden' name='r' value='<?=$_ctx->r?>'/>
</form>
</div>



<div class="clear"></div>

<?php $this->_endblock('contents'); ?>
